package com.aglhz.nature.view;

import com.aglhz.nature.R;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class SecondClassScrollActivity extends Activity{
	private WebView second_class_scroll;
	private String link;
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.secondclassificationscroll);
	Intent intent =getIntent();
	link = intent.getStringExtra("classification_scroll");
	
	second_class_scroll=(WebView) findViewById(R.id.second_class_scroll);
	
	WebSettings webSettings = second_class_scroll.getSettings();  
    //设置WebView属性，能够执行Javascript脚本    
    webSettings.setJavaScriptEnabled(true);    
    //设置可以访问文件  
    webSettings.setAllowFileAccess(true);  
  //webview自适应屏幕
    webSettings.setUseWideViewPort(true); 
    webSettings.setLoadWithOverviewMode(true); 

    second_class_scroll.loadUrl(link);    
    //设置Web视图  
   
    second_class_scroll.setWebViewClient(new WebViewClient(){
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            view.loadUrl(url);
            return true;
        }
       
        @Override
        public void onPageStarted(WebView view, String url, Bitmap favicon) {
        	
        	super.onPageStarted(view, url, favicon);
     
        
    	
        }
        
        @Override
		public void onPageFinished(WebView view, String url) {
			
			super.onPageFinished(view, url);
			

		}
    });
 

	
	}
}
